package com.zmn.oms.dubbo.interfaces.channel;

import com.zmn.common.dto2.ResponseDTO;
import com.zmn.oms.common.dro.conf.channel.ConfChannelWorkOrderTypeDRO;
import com.zmn.oms.common.dro.conf.channel.ConfOrderChannelDRO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Positive;
import javax.validation.constraints.Size;
import java.util.List;

/**
 * 类描述: 渠道订单参数配置 Dubbo接口
 *
 * @author: liudi
 * @since: 2022/02/22 16:36
 */
@Api(value = "渠道订单配置服务", tags = {"渠道订单配置"})
public interface ConfOrderChannelListRemoteService {

	/**
	 * 描述: 根据渠道ID查询渠道订单配置
	 *
	 * @param channelId 渠道ID
	 * @return ResponseDTO<ChannelOrderConfigDRO>
	 * @auther: linfeng
	 * @since: 2020/11/04 10:47
	 */
	@ApiOperation(value = "根据渠道ID查询渠道订单配置", response = ResponseDTO.class, notes = "渠道订单配置", tags = {"渠道订单配置"})
	ResponseDTO<ConfOrderChannelDRO> getByChannelId(@NotNull(message = "渠道ID不能为空")
	                                                @ApiParam(value = "渠道ID", required = true) Integer channelId);

	/**
	 * 根据渠道ID集合查询渠道订单配置
	 *
	 * @param channelIds 渠道ID集合
	 * @return ResponseDTO<List < ConfOrderChannelDRO>>
	 * @author liudi
	 * @since: 2022/06/07 20:37
	 */
	@ApiOperation(value = "根据渠道ID集合查询渠道订单配置", response = ResponseDTO.class, notes = "渠道订单配置", tags = {"渠道订单配置"})
	ResponseDTO<List<ConfOrderChannelDRO>> listConfOrderChannelByChannelIds(@NotNull(message = "渠道ID集合不能为空")
	                                                                        @Size(min = 1, max = 100, message = "渠道ID集合参数不能为空且个数不能超过100")
	                                                                        @ApiParam(value = "渠道Id", required = true) List<Integer> channelIds);

	/**
	 * 根据渠道ID查询工单完成控制，工单取消控制，特殊优惠控制信息
	 *
	 * @param channelId
	 * @return ResponseDTO<ChannelWorkOrderTypeDRO>
	 * @auther: linfeng
	 * @since 2020/12/16 16:21
	 */
	@ApiOperation(value = "根据渠道ID查询工单完成/取消控制，特殊优惠控制信息", response = ResponseDTO.class, notes = "渠道订单配置", tags = {"渠道订单配置"})
	ResponseDTO<ConfChannelWorkOrderTypeDRO> getWorkOrderTypeByChannelId(@NotNull(message = "渠道ID不能为空")
	                                                                     @ApiParam(value = "渠道ID", required = true) Integer channelId);

	/**
	 * 根据渠道ID查询是否需要通知工程师（工单超时预警后）
	 *
	 * @param channelId 渠道ID
	 * @return true需要通知  false不需要通知
	 */
	@ApiOperation(value = "是否通知工程师", response = ResponseDTO.class, notes = "是否通知工程师", tags = {"渠道订单配置"})
	ResponseDTO<Boolean> checkNotifyEngineer(@NotNull(message = "channelId不能为空")
	                                         @Positive(message = "channelId必须为大于0的正整数")
	                                         @ApiParam(value = "渠道ID", required = true) Integer channelId);

}
